using UnityEngine;
using System.Collections;

public class CameraFreeMove : MonoBehaviour
{

    public string INPUT_HORIZONTAL = "Horizontal";
    public string INPUT_VERTICAL = "Vertical";

    public float xSpeed = 1;
    public float ySpeed = 1;

    Transform curTransform;
    // Use this for initialization
    void Start()
    {
        curTransform = transform;
    }

    // Update is called once per frame
    void Update()
    {
        float h = Input.GetAxis(INPUT_HORIZONTAL);
        float v = Input.GetAxis(INPUT_VERTICAL);
        h = h * xSpeed * Time.deltaTime;
        v = v * ySpeed * Time.deltaTime;
        Vector3 moveDir = new Vector3(h, 0, v);

        curTransform.Translate(moveDir, Space.Self);
    }
}
